//    Copyright (C) Kherty.  All rights reserved.
using System;
using System.Windows.Data;
using OpenLS.Drawing;
using OpenLS.Drawing.UI;
using OpenLS.Drawing.UI.Internals;

namespace OpenLS.Chart.UI
{
    class FillColorBaseSchemeToBrushConverter: IMultiValueConverter
    {
        #region IMultiValueConverter Members

        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            FillProperties p = StrictConverter.Convert<FillProperties> (values[0]);
            ColorBase br = StrictConverter.Convert<ColorBase>(values[1]);
            ColorScheme scheme =  StrictConverter.Convert<ColorScheme>( values[2]);
            if (p != null)
                return FillPropertiesToBrushConverter.FillPropertiesToBrush(p, scheme, null);
            return ColorBaseToBrushConverter.ColorBaseToBrush(br, scheme);
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
